package com.youhome.common.response;

/**
 * Created by chen365 on 2017/10/18
 */
public enum ResultCode {
    SUCCESS(0, "成功"),
    FAIL(1, "失败"),
    ERROR(2, "系统错误"),
    DATA_NULL(3, "空数据"),
    EMPTY_PHONE(4, "手机号不能为空"),
    EMPTY_PASSWORD(5, "密码不能为空"),
    FAIL_LOGIN(6, "登陆失败"),

    ERROR_PHONE(7, "手机号不正确"),
    REGISTERED_PHONE(8, "手机号已经注册"),
    EMPTY_SMS_TYPE(9, "活动类型不能为空"),
    ERROR_VALIDATE_CODE(10, "验证码错误，请重试"),
    VALIDATE_CODE_FAILED(11, "验证码验证失败，请重试"),
    EMPTY_SMS_VALIDATE_CODE(12, "短信验证码不能为空"),
    EMPTY_MSGID(13, "短信验证码ID不能为空"),
    EMPTY_CREDENTIAL_TYPE(14, "证件类型不能为空"),
    ERROR_CREDENTIAL_TYPE(15, "证件类型错误"),
    EMPTY_CREDIT_CODE(16, "统一社会信用代码不能为空"),
    EMPTY_BUSINESS_LICENSE_NUMBER(17, "营业执照证件号不能为空"),
    EMPTY_ORGANIZATION_CODE(18, "组织机构代码不能为空"),
    ERROR_PRINCIPAL_EMAIL(19, "负责人邮箱不正确"),
    EMPTY_PRINCIPAL_NAME(20, "负责人姓名不能为空"),
    EMPTY_COMPANY_ADDRESS(21, "公司所在地址不能为空"),
    UNREGISTERED_PHONE(22, "手机号尚未注册"),
    EXPIRED_LOGIN(23, "登陆已经过期，请重新登陆"),
    ERROR_COMPANY_INFO(24, "公司信息有误，请重新修改"),
    ILLEGAL_OPERATION(25, "非法操作"),
    EMPTY_COUNSELOR_NAME(26, "顾问名称不能为空"),
    ERROR_EMAIL(27, "邮箱格式不正确"),
    EMPTY_SEX(28, "请选择性别"),
    NO_DATA(29, "暂无数据"),
    ERROR_PARAMETER(30, "参数错误"),
    DATA_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED(31, "数据不存在或已经删除"),
    EMPTY_CLIENT_NAME(32, "请输入客户姓名"),
    ERROR_CLIENT_PHONE(33, "请正确输入客户手机号"),
    ERROR_CLIENT_EMAIL(34, "请正确输入客户邮箱"),
    CLIENT_TAG_IS_EXIST(35, "客户已经打上此标签"),
    CLIENT_TAG_IS_NOT_EXIST(36, "客户未打上此标签，无法删除"),
    NO_ACCOUNT(37, "帐号不存在"),
    NO_TAGS(38, "目前暂无标签，请先添加标签"),
    IS_EXIST_TAGS(39, "标签已经存在，请先不要重复添加标签"),
    HOUSE_ILLEGALITY_ZIPCODE(40, "非法的邮编地址"),
    HOUSE_ADDRESS_LENGTH_SHORTAGE(41, "地址搜索必须要三个字母以上"),
    HOUSE_CITY_LENGTH_SHORTAGE(42, "城市搜索必须要三个字母以上"),
    UNSUPPORTED_SEARCH_TYPE(43, "不支持的搜索类型"),
    HAS_JOINED_SHARE(44, "已经加入临时分享组"),
    UNSELECTED_HOUSING_SOURCE(45, "未选择房源"),
    DELETE_FAIL(46, "删除失败"),
    ERROR_KEYWORD_LENGTH_THREE(47, "关键字起码要有3个字母"),
    NO_DATA_WAS_FOUND(48, "未查询到数据"),
    COUNSELOR_INEXISTENCE(49, "顾问不存在"),
    CLIENT_REGISTERED_WITH_COUNSELOR(50, "已经注册到该公司的顾问名下"),
    CAPTCHA_CODE(51, "验证码无效"),
    VERIFICATION_CODE_EXPIRATION(52, "验证码过期"),
    VERIFICATION_CODE_HAS_BEEN_VALIDATED(53, "验证码已验证通过"),
    CAN_SEND_SHORT_MESSAGE_MARGIN_SHORT(54, "可发短信余量不足"),
    VERIFY_CODE_IS_EMPTY(55, "验证码为空"),
    SEND_REPEATEDLY(56, "重复发送"),
    DOWNLOAD_FAIL(57, "下载失败"),
    TAGS_COUNT_EXCEED_CAPACITY(58, "最多能创建10个标签"),
    EMPTY_HOUSE_ID(59, "请选择房源"),
    HOUSE_HAVE_RECOMMENDED(60, "房源已经推荐"),
    IS_TOP_COUNT(61, "金牌顾问最多只设置9个"),
    NOT_EXIST_USER(62, "帐号不存在"),
    PLEASE_SELECT_THE_RECIPIENT(63, "请选择收件人"),
    NOT_EXIST_MESSAGE(64, "信息不存在或已经删除"),
    RECOMMEND_HOUSE_COUNT_EXCEED_CAPACITY(65, "最多能推荐10个房源"),
    EMAIL_ADDRESS_CANNOT_BE_EMPTY(66, "收件人地址不能为空"),
    EMAIL_SUBJECT_CANNOT_BE_EMPTY(67, "邮件主题不能为空"),
    EMAIL_HTML_BODY_CANNOT_BE_EMPTY(68, "邮件正文不能为空"),
    DO_NOT_HAVE_PERMISSION(69, "没有权限"),
    CREATE_HOUSE_FAIL(70, "创建房源失败"),
    UPDATE_HOUSE_FAIL(71, "更新房源失败"),
    CREATE_HOUSE_PHOTO_FAIL(72, "房源图片更新失败"),
    NOT_EXIST_HOUSE_PHOTO(73, "房源图片不存在"),
    NO_SMS_TEMPLATE(74, "请选择短信模版"),
    NO_SMS_PHONE(75, "请选择接收人"),
    NO_SMS_PARAMETER(76, "请输入短信参数"),

    INVALID_MAIL_ADDRESS_NOT_FOUND(77, "发信地址不存在"),
    INVALID_MAIL_ADDRESS_STATUS_MAL_FORMED(78, "发信地址状态不正确 "),
    INVALID_TO_ADDRESS(79, "目标地址不正确"),
    INVALID_BODY(80, "邮件正文不正确。textBody 或 htmlBody 不能同时为空"),
    INVALID_SEND_MAIL_SPAM(81, "本次发送操作被反垃圾系统检测为垃圾邮件，禁止发送。请仔细检查邮件内容和域名状态等"),
    INVALID_SUBJECT_MAL_FORMED(82, "邮件主题限制在 100 个字符以内"),
    INVALID_MAIL_ADDRESS_DOMAIN_MAL_FORMED(83, "发信地址的域名状态不正确，请检查 MX、SPF 配置是否正确"),
    INVALID_FROM_ALIAS_MAL_FORMED(84, "发信人昵称不正确，请检查发信人昵称是否正确，长度应小于 15 个字符"),
    NOT_EXIST_TEMPLATE_HTML(85, "模版不存在"),
    NOT_MODULE1_DATA(86, "模块1内容不能为空"),
    NOT_MODULE2_DATA(87, "模块2内容不能为空"),
    NOT_MODULE3_DATA(88, "模块3内容不能为空"),
    NOT_MODULE4_DATA(89, "模块4内容不能为空"),
    NOT_MODULE5_DATA(90, "模块5内容不能为空"),

    NOT_TEMPLATE(91, "请选择模版"),
    TEMPLATE_DATA_ALREADY_EXISTS(92, "数据还有状态草稿或正在审核的数据"),
    HAS_BEEN_RELEASED(93, "已经发布"),
    UNAPPROVED(94, "未通过审核"),
    INVALID_BEGIN_DATE(95, "无效的开始时间"),
    INVALID_END_DATE(96, "无效的结束时间"),
    INVALID_COMPANY_UUID(97, "无效的公司UUID"),
    NOT_EXIST_COMPANY(98, "公司不存在"),
    INVALID_CLASS_METHOD(99, "无效的方法类型"),
    NOT_TEMPLATE_MODULE_DATA(100, "模块数据不能为空"),
    EXIST(101, "已经存在"),
    EMPTY_PARAM(102, "参数不能为空"),
    FAIL_UPLOAD(103, "上传失败"),
    NOT_EXIST_HOUSE(104, "房源不存在"),
    FAIL_ORDER_SUBMIT(105, "订单提交失败"),
    FAIL_PAY(106, "支付失败"), HOUSE_INEXISTENCE(107, "房源不存在"),
    ERROR_REPORT_TYPE(108, "报告类型不正确"),
    REPORT_HAS_GENERATED(109, "房产报告已经生成，请前往\"房产报告管理\"页面查看！"),
    REPORT_HAS_BEEN_GENERATED(110, "房产报告将在5分钟内生成完毕并扣除1个份数，稍后请前往\"房产报告管理\"页面查看！"),
    EMPTY_ZIP(111, "邮编不存在"),
    REPORT_COUNT_INSUFFICIENT(112, "报告数不足，请购买"),
    NOT_FAVOURITE_HOUSE(113, "未收藏房源"),
    HAVE_FAVOURITE(114, "房源已经收藏"),
    METRO_NULL(115, "大都会不能为空"),
    CITY_NULL(116, "城市不能为空"),
    STATE_NULL(117, "州不能为空"),
    COUNTY_NULL(118, "郡县不能为空"),
    HOUSE_COORDINATES_IS_NULL(119, "房源坐标为空"),
    NOT_FOUND_SCHOOL(120, "没有到找到学校"),
    ERROR_LONGITUDE_LATITUDE(121, "经纬度不正确"),
    ERROR_INVALID_INPUT(122, "输入无效错误"),
    NO_DATA_EXIST(123, "数据不存在"),
    ERROR_INTERNAL(124, "内部错误"),
    ERROR_SQL(125, "SQL错误"),
    EMPTY_TEMPLATE_TYPE(126, "短信模版类型不能为空"),

    INVALID_ACCESS_TOKEN(127, "无效 Access Token"),
    EXPIRE_ACCESS_TOKEN(128, "Access Token 已经过期"),
    REQUIRE_ACCESS_TOKEN(129, "Access Token 不能为空"),
    FORMAT_ACCESS_TOKEN(130, "Access Token 格式不正确"),
    REQUIRE_AUTHORIZATION(131, "AUTHORIZATION 不能为空"),

    IS_BINDING_PHONE(132, "手机号已经绑定"),
    NOT_FAVOURITE(133, "房源未收藏"),
    HOUSE_ILLEGALITY_ZIP_CODE(134, "非法的邮编地址"),
    PHONE_BINDING_FAILED(135, "手机绑定失败"),

    EMPTY_MSG_ID(136, "短信验证码ID不为空"),
    EMPTY_MSG_CODE(137, "短信验证码不为空"),
    FORMAT_MSG_CODE(138, "短信格式不正确"),
    UNBOUND_PHONE(139, "未绑定手机号"),
    EMPTY_NAME(140, "姓名不能为空"),
    NOT_FILLED_CLIENT_INFO(141, "未填写客户信息,请填写"),
    EMPTY_APPOINTMENT_TIME(142, "预约时间不能为空"),
    EMPTY_SEE_HOUSE_TYPE(143, "看房类型不能为空"),
    EMPTY_KEYWORD(144, "查询关键字不能为空"),
    ERROR_RESUBMIT(145, "已经提交"),
    REPORTS_CANNOT_BE_PRODUCED(146, "房产报告无法生成"),
    UNAUTHORIZED(147, "没有权限"),
    LAND_EXPIRATION(148, "登陆过期,请重新登陆"),
    EMPTY_BASE64_DATA(149, "BASE64 数据不能为空"),
    EMPTY_IMG_SUFFIX(150, "图片后辍名不能为空"), CLIENT_NOT_EXIST(151, "客户不存在"),

    EMPTY_STATUS(151, "状态不能为空"), HAVE_RECOMMENDED(152, "已经推荐"),
    ALREADY_DELETED(153, "已经删除"), NOT_EXIST_REPORT(154, "房源报告不存在"),
    ILLEGAL_REQUEST(155, "非法请求"), REPORT_NOT_GENERATED(156, "报告未生成"),
    REPORT_GENERATE_FAILURE(157, "报告生成失败"),
    REPORT_NOT_GENERATE(159, "报告未生成过"),
    OSS_PHOTO_DELETE_FAIL(160, "oss 图片删除失败"),
    UNSELECTED_UPLOAD_FILE(161, "未选择上传文件"),
    EMPTY_CODE(162, "CODE 不能为空"), EMPTY_PHOTO(163, "请选择要上传的图片"),
    ERROR_PHOTO_EXT(164, "图片格式不正确，不允许传"),

    ERROR_TIER_TYPE(165, "请求等级错误"),
    ERROR_FORMAT(166, "请求格式错误"),
    EMPTY_ZIPCODE(167,"邮编不正确" ),
    ERROR_ZIPCODE_LENGTH(168, "邮编格式不正确"),
    INVALID_TOKEN(169, "Token错误"),
    INVALID_TOKEN_EXPIRED(170, "Token无效"),
    INVALID_TOKEN_FORMAT(171, "Token过期"),
    INVALID_TOKEN_SIGNATURE(172, "Token解析错误"),
    INVALID_TOKEN_EMPTY(173, "Token不能为空"),
    INVALID_TOKEN_FORBIDDEN(174, "Token已经被禁止");




    /**
     * 状态
     */
    private Integer status;

    /**
     * 提示信息
     */
    private String msg;

    ResultCode(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
